import { createRouter, createWebHistory } from "vue-router";
import {routes} from "./routes.ts";
import NProgress from "nprogress";

const router = createRouter({
  history: createWebHistory(),
  routes,
});

router.beforeEach( (_to, _from, next) => {
  NProgress.start();
  next();
});

router.afterEach(() => {
  NProgress.done();
})

export default router;
